﻿@{
    try{
        Response.Buffer = true;
        Response.Expires = 0;
        
        Response.Clear();
        
        Response.ContentType = "image/gif";
        
        var db = Database.Open("Electrondb");
        var consulta = "SELECT img FROM ImgProducto WHERE ProductoId = @0";
        var resultado = db.QuerySingle(consulta,Request['IdProd']);
        
        Response.BinaryWrite((byte[])prod.img);
        
        
    }
    catch(Exception ex)
    {
        string error = ex.Message.ToString();
        
    }
    
}
